<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<f:view>
  
  <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></meta>
      <title>
       <h:outputText value="Creer un nouveau compte client"/>
      </title>
     <link href="../css/solutech.css" rel="stylesheet" media="screen"></link>
     
    </head>
    <body><h:form>
        <table width="100%" border="0">
          <tr>
            <td>
              <h1 align="center">
               <h:graphicImage url="/img/logo.jpg"
                                alt="Solutech Logo" style="height: 124px; width: 181px"/>
                <h:outputText value="Solutech-Shop Application"/>
              </h1>
            </td>
          </tr>          
          <tr>
          <td> 
        <f:subview id="clientbar">
          <jsp:include page="clientbar.jsp"/>
        </f:subview>
          </td>
         </tr>
          <tr>
            <td>
              <p>
                <h:outputText value="Creer un nouveau compte client" styleClass="PageTitle"/></p>

              <h:messages globalOnly="true" infoClass="RegError"/>              

              <h:panelGrid width="70%" columns="3" border="0">

                <h:outputLabel value="Prenom:" for="fname" />                
                <h:inputText required="true" id="fname"
                             binding="#{CreerClient_Backing.firstName}"/>
                <h:message for="fname" errorClass="ValidateError"/>

                <h:outputLabel value="Nom:" for="lname" />                
                <h:inputText required="true" id="lname"
                               binding="#{CreerClient_Backing.lastName}"/>
                <h:message for="lname" errorClass="ValidateError"/>

              

                <h:outputLabel value="Date de naissance:" for="dob"/>                
                <h:inputText id="dob" required="true" 
                    
                         binding="#{CreerClient_Backing.dob}" >                  
                  <f:convertDateTime pattern="mm-dd-yyyy"/>
                  
                </h:inputText>
                <h:message for="dob" errorClass="ValidateError"/>

                <h:outputLabel value="Email" for="email"/>                
                <h:inputText required="true" id="email"
                               binding="#{CreerClient_Backing.email}"
                             validator="#{CreerClient_Backing.validateEmail}"/>
                <h:message for="email" errorClass="ValidateError"/>

                <h:outputLabel value="Adresse:" for="address"/> 
                <h:inputText required="true" id="address"
                               binding="#{CreerClient_Backing.address}"/>
                <h:message for="address" errorClass="ValidateError"/>
                
  				<h:outputLabel value="Numero de telephone" for="tel"/>                
                <h:inputText required="true" id="tel"
                             binding="#{CreerClient_Backing.phoneNum}"/>
                <h:message for="tel" errorClass="ValidateError"/>
                
                <h:outputLabel value="Login:" for="userid"/>                
                <h:inputText required="true" id="userid"
                             binding="#{CreerClient_Backing.userid}"/>
                <h:message for="userid" errorClass="ValidateError"/>

                <h:outputLabel value="Mot de passe:" for="password"/>                
                <h:inputSecret required="true" id="password"
                             binding="#{CreerClient_Backing.password}" />
                <h:message for="password" errorClass="ValidateError"/>

                <h:outputLabel value="Confirmer mot de passe" for="password2"/>                
                <h:inputSecret required="true" id="password2"
                             binding="#{CreerClient_Backing.passwordCheck}"
                            validator="#{CreerClient_Backing.validatePassword}"/>
                <h:message for="password2" errorClass="ValidateError"/>


                <f:verbatim>&nbsp;</f:verbatim>
                <h:panelGroup>
                  <h:commandButton value="Creer"
                                   action="#{CreerClient_Backing.creerClient}"/>
                  <f:verbatim>&nbsp;&nbsp;&nbsp;&nbsp;</f:verbatim>
                  <h:commandButton value="Cancel" action="cancel"
                                   immediate="true"/>
                </h:panelGroup>

              </h:panelGrid>
            </td>
          </tr>
        </table>
      </h:form></body>
  </html>
</f:view>